/*  NVS: non volatile storage in flash
 *
 * Copyright (c) 2018 Laczen
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-09-03     Liuis        Ported from zephyr RTOS.
 */
 
#ifndef __NVS_CFG_H_
#define __NVS_CFG_H_

#ifdef __cplusplus
extern "C" {
#endif

/** Enable Non-volatile Storage cache, used to reduce the NVS data lookup
 *  time. Each cache entry holds an address of the most recent allocation
 *	table entry (ATE) for all NVS IDs that fall into that cache position.
 */
#define     CONFIG_NVS_LOOKUP_CACHE         1

/** Number of entries in Non-volatile Storage lookup cache.
 *  Depends on NVS_LOOKUP_CACHE.
 *  It is recommended that it be a power of 2.
 *  MAKE SURE this value is larger or equal to the number of kv pairs used
 *  in application.
 */
#define     CONFIG_NVS_LOOKUP_CACHE_SIZE    8


#ifdef __cplusplus
}
#endif

#endif /* __NVS_CFG_H_ */
